package com.atguigu.scala.chapter_04

import scala.io.Source

object Client {
  def main(args: Array[String]): Unit = {
    val source = Source.fromFile("abc.txt")
//    val lines:Iterator[String]=source.getLines()
//    while (lines.hasNext){
//      println(lines.next())
//    }
    val lines:Iterator[String]=source.getLines()
    while (lines.hasNext){
      println(lines.next())
    }
  }

}
